package com.asset.dispoal.batchEvidenceTypeMapper;

import com.asset.dispoal.batchEvidenceTypeMapper.api.SysBatchEvidenceTypeMapperService;
import com.asset.dispoal.batchEvidenceTypeMapper.dto.SysBatchEvidenceTypeMapperRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.protocol.Result;

/**
 * @author qr
 * @date 2022/3/25$
 */
@RestController
@Api(value = "证据映射关联", tags = "证据映射关联")
@RequestMapping("sys/sysBatchEvidenceTypeMapper")
public class SysBatchEvidenceTypeMapperController {

    @Autowired
    SysBatchEvidenceTypeMapperService sysBatchEvidenceTypeMapperService;

    @PostMapping("insert")
    @ApiOperation(value = "新增", notes = "新增")
    public Result insert(@RequestBody SysBatchEvidenceTypeMapperRequest request) {
        return sysBatchEvidenceTypeMapperService.insert(request);
    }

    @PostMapping("update")
    @ApiOperation(value = "修改", notes = "修改")
    public Result update(@RequestBody SysBatchEvidenceTypeMapperRequest request) {
        return sysBatchEvidenceTypeMapperService.update(request);
    }

    @PostMapping("delete")
    @ApiOperation(value = "删除", notes = "删除")
    public Result delete(@RequestBody String id) {
        return sysBatchEvidenceTypeMapperService.delete(id);
    }


    @GetMapping("queryPage")
    @ApiOperation(value = "分页查询", notes = "分页查询")
    public Result queryPage(SysBatchEvidenceTypeMapperRequest request) {
        return sysBatchEvidenceTypeMapperService.queryPage(request);
    }
}
